//
//  NSObject+NIMSysManager.m
//  qbim
//
//  Created by shiyunjie on 17/1/18.
//  Copyright © 2017年 shiyunjie. All rights reserved.
//

#import "NIMSysManager.h"
#import "NIMGlobalProcessor.h"

@implementation NIMSysManager
static NSString * const CLASS_NAME = @"NIMSysManager";
SingletonImplementation(NIMSysManager)
- (void)dealloc
{
    
}

- (id)init
{
    self = [super init];
    self->_qb_login = nil;
    self.typeDict = [[NSMutableDictionary alloc] init];
    self.relationDict = [[NSMutableDictionary alloc] init];
    self.recvDict = [[NSMutableDictionary alloc] init];
    self.sidDict = [[NSMutableDictionary alloc] init];
    self.remarkDict = [[NSMutableDictionary alloc] init];
    self.gidsArr = [[NSMutableArray alloc] initWithCapacity:10];
    self.offlinesArr = [[NSMutableArray alloc] initWithCapacity:10];
    self.progressDict = [[NSMutableDictionary alloc] init];;
    return self;
}

- (void)removeAll
{
    self.typeDict = [[NSMutableDictionary alloc] init];
    self.relationDict = [[NSMutableDictionary alloc] init];
    self.recvDict = [[NSMutableDictionary alloc] init];
    self.sidDict = [[NSMutableDictionary alloc] init];
    self.remarkDict = [[NSMutableDictionary alloc] init];
    self.gidsArr = [[NSMutableArray alloc] initWithCapacity:10];
    self.offlinesArr = [[NSMutableArray alloc] initWithCapacity:10];
    self.progressDict = [[NSMutableDictionary alloc] init];;

}

-(void) SetLoginInfo:(SSIMLogin *) ns_login
{
    self->_qb_login = ns_login;
}

-(SSIMLogin *)GetLoginInfo
{
    return self->_qb_login;
}

-(void)getServerTime
{
    if ([[NetCenter sharedInstance] GetNetStatus]==LOGINED) {
        [[NIMGlobalProcessor sharedInstance].sys_processor getServerTime];
    }
}

-(E_NET_STATUS)GetNetStatus
{
    return [[NetCenter sharedInstance] GetNetStatus];
}

@end
